<?php
$article_name=$_POST['article_name'];
$article_author=$_POST['article_author'];
$dbh=new PDO('mysql:host=localhost;dbname=gaofei','root','root');
$sql="insert into articless(article_name,article_author) VALUE('$article_name','$article_author')";
$arr=$dbh->exec($sql);
if($arr)
{
  header("location:list.php");
}
else{
    echo "添加失败";
}